<?php

require_once __DIR__ . '/../Medoo/Medoo.php';
require_once __DIR__ . '/sqlConnect.php';
require_once __DIR__ . '/../php_config/web.php';

// $username = "xinmodeng";
// $password = "Xinmoden202008SQL";
// $dbname = "xinmodeng";

// Using Medoo namespace
use Medoo\Medoo;


class MedooSql
{
    public $database;

    function __construct()
    {
        global $dbname, $servername, $username, $password;

        $this->database = new Medoo([
            // required
            'database_type' => 'mysql',
            'database_name' => $dbname,
            'server' => $servername,
            'username' => $username,
            'password' => $password,

            // [optional]
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_general_ci',
            'port' => 3306,
        ]);
    }
}
